package jea.machine.longitudinalviewers;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.LineBorder;

public class FrameLongitudinalProfileViewer extends JInternalFrame implements ActionListener
{
	private static final long serialVersionUID = 1L;
	protected JPanel panelXYProfiles;
	protected PanelLongitudinalProfileViewer panelXProfile, panelYProfile;
	protected JScrollPane mainScrollPane;

	public FrameLongitudinalProfileViewer()
	{
	    	this.setClosable(true);
	    	this.setIconifiable(true);
	    	this.setMaximizable(true);
	    	this.setResizable(true);
	    	//this.setResizable(true);
	    	this.setTitle("LONG Profile Viewer");
		    this.setBorder(new LineBorder(Color.DARK_GRAY,2));
		    this.setBackground(Color.BLACK);
		    this.setLocation(100, 100);
		    this.setSize(new Dimension(430,440));
		    this.setVisible(true);
		    
		    initPanels();
	  }
	  private void initPanels()
	  {
	    	this.setLayout(new BorderLayout());
	    	panelXYProfiles = new JPanel(new GridLayout(2, 1));
            panelXYProfiles.setPreferredSize(new Dimension(3000,600));
	    	
            panelXProfile = new PanelLongitudinalProfileViewer(this);
            panelXProfile.setBackground(Color.LIGHT_GRAY);
            panelXProfile.setPreferredSize(new Dimension(3000,600));
              
            panelYProfile = new PanelLongitudinalProfileViewer(this);
            panelYProfile.setBackground(Color.WHITE);
            panelYProfile.setPreferredSize(new Dimension(3000,600));
            
            panelXYProfiles.add(panelXProfile);
            panelXYProfiles.add(panelYProfile);
            
            mainScrollPane = new JScrollPane(panelXYProfiles);
	    	
	    	//panelControls = new JPanel(new FlowLayout());
	    	//panelControls.setPreferredSize(new Dimension(400,35));
	   
            //panelMain.add(mainScrollPane);
            //this.add(panelMain);
            this.add(mainScrollPane);
	  }
	@Override
	public void actionPerformed(ActionEvent e)
	{
	}	
	  
}
